#include <iostream>
#include <string.h>
using namespace std;

const int size=128;
void main()
{	
	char mas[size];
	char mas2[size];
	gets(mas);
	char *pm=strstr(mas,"m");
	char *pn=strstr(mas,"n");
	int len_m=strlen(pm)-strlen(pn)-1;
	int len_n=strlen(pn);
	
	strncpy(mas2,pm+1,len_m);
	mas2[len_m]='\0';
	
	cout<<mas2<<endl;
	
}